package com.starhub.service.impl;

import java.util.List;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.starhub.dao.CategoryDao;
import com.starhub.entity.Category;
import com.starhub.service.CategoryService;

@RestController
public class CategoryServiceImpl implements CategoryService {

	private CategoryDao categoryDao;
	
	@RequestMapping(value = "getHeaderCategories")
	public List<Category> getHeaderCategories() {
		List<Category> result = categoryDao.getHeaderCategories(); 
		return result;
	}
	
	@RequestMapping(value = "getFooterCategories")
	public List<Category> getFooterCategories() {
		List<Category> result = categoryDao.getFooterCategories(); 
		return result;
	}

	public void setCategoryDao(CategoryDao categoryDao) {
		this.categoryDao = categoryDao;
	}
}
